import request from '../utils/request'

export const queryList = ({ groupId, ...restParams }) => {
  return request({
    method: 'GET',
    url: `idm-app/rest/admin/groups/${groupId}/users`,
    params: {
      ...restParams,
      page: 0,
      pageSize: 50
    }
  })
}

export const createOne = ({ groupId, userId }) => {
  return request({
    method: 'POST',
    url: `idm-app/rest/admin/groups/${groupId}/members/${userId}`
  })
}

export const deleteOne = ({ groupId, userId }) => {
  return request({
    method: 'DELETE',
    url: `idm-app/rest/admin/groups/${groupId}/members/${userId}`
  })
}